package io.renren.modules.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.erp.entity.OrgaUserRel;
import io.renren.modules.erp.entity.Unit;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UnitService  extends IService<Unit> {

    public Unit getUnit(long id)throws Exception ;

    public List<Unit> getUnitListByIds(String ids)throws Exception;

    public List<Unit> getUnit()throws Exception ;
    public PageUtils select(String name, int currPage, int pageSize)throws Exception ;
    public Long countUnit(String name)throws Exception ;
    public int insertUnit(Unit unit, HttpServletRequest request)throws Exception;
    public int updateUnit(String beanJson, Long id, HttpServletRequest request)throws Exception;
    public int deleteUnit(Long id, HttpServletRequest request)throws Exception;
    public int batchDeleteUnit(String ids, HttpServletRequest request) throws Exception;
    public int checkIsNameExist(Long id, String name)throws Exception ;
    public int batchDeleteUnitByIds(String ids ,Long userId)throws Exception ;
    public int batchDeleteUnitByIdsNormal(String ids,Long userId) throws Exception ;
    public Long getUnitIdByName(String name);
}
